-
Notifications
You must be signed in to change notification settings - Fork 791
[SYCL][UR] Fix build with libc++ #19521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Sarnie, Nick <[email protected]>
| OUTPUT_VARIABLE LIBCXX_PATH | ||
| OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
| execute_process( | ||
| COMMAND ${CMAKE_CXX_COMPILER} --print-file-name=libc++abi.a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the change here is because --print-file-name doesn't work as required here so the lookup always fails, so just fall back to the underlyting compiler's errors.
Signed-off-by: Sarnie, Nick <[email protected]>
Signed-off-by: Sarnie, Nick <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation update looks good to me.
I'm not sure if we should add a note about base LLVM though.
Signed-off-by: Sarnie, Nick <[email protected]>
) We need to apply the custom flags both to the libdevice BC file generation and the imf host compile, as these flags could contain paths to stdlibc++ or glibc which are used in both. I forgot to do this in my [change](#19521) adding this flag. --------- Signed-off-by: Sarnie, Nick <[email protected]>
We previously added support for building
libsyclindividually withlibc++. At that time,libsycldidn't link againstlibLLVMso they did not need to be using the same STL implementation.Now,
libsycldoes link againstlibLLVM, one example here.Remove all the code that was to support
libsyclin particular and just make it work with the normal option LLVM uses,LLVM_ENABLE_LIBCXX. Most of the code I added actually checksLLVM_LIBCXX_USED, because LLVM checks at configure time iflibc++actually works even when passedLLVM_ENABLE_LIBCXX, and if it fails, it falls back tolibstdc++, and most of the time we actually want to know if we are actually usinglibc++.I added a CMake option
SYCL_LIBDEVICE_CXX_FLAGSto set the flags for libdevice because it will be required if someone doesn't use the LLVM option and just does it throughCMAKE_CXX_FLAGS, as those aren't used for libdevice but it still uses the STL.The two changes in
unified-runtime/source/loader/layers/sanitizer/msan/msan_libdevice.hppandsycl/source/builtins/common_functions.cppfix compile errors withlibc++.I also plan to add a job to the nightly to lock this down.
#19347